<?php class FckHelper extends Helper {
    
    var $helpers = Array('Html');
    
    function startup(&$model) {
        pr(&$model); die;
        $this->controller = &$controller;
        if(isset($controller->max_cache_age)){
            $this->max_cache_age = $controller->max_cache_age;
        }        
        $this->cache_location = CACHE.'thumbs'.DS;
    }
    
    function input($field, $width = 400) {
        $field = explode('.', $field);
        if(empty($field[1])) {
            // need to know how to call a model from a helper
        } else {
            $model = $field[0];
            $controller = $field[1];
        }
        
        require_once WWW_ROOT.DS.'js'.DS.'fckeditor'.DS.'fckeditor.php';
        $oFCKeditor = new FCKeditor('data['.$model.']['.$controller.']') ;
        $oFCKeditor->BasePath    = '/js/fckeditor/' ;
        $oFCKeditor->Value        = $this->data[$model][$controller];
        $oFCKeditor->Height        = $width;
        $oFCKeditor->Create();   
    }
}
?>